package editor;

import observer.ObservedColour;

import static editor.InputTrigger.*;
import static java.awt.event.KeyEvent.*;

/**
 * This class is an all-static container of the UI configuration options.
 *
 * @author Neil Dickson
 */
public abstract class Configuration {
	/**
	 * Private constructor in abstract class so that no instances can be made.
	 */
	private Configuration() {}

	public static final InputTrigger	UP						= new InputTrigger(VK_UP);
	public static final InputTrigger	DOWN					= new InputTrigger(VK_DOWN);
	public static final InputTrigger	PAGE_UP					= new InputTrigger(VK_PAGE_UP);
	public static final InputTrigger	PAGE_DOWN				= new InputTrigger(VK_PAGE_DOWN);
	public static final InputTrigger	LEFT					= new InputTrigger(VK_LEFT);
	public static final InputTrigger	RIGHT					= new InputTrigger(VK_RIGHT);
	public static final InputTrigger	SELECT_UP				= new InputTrigger(VK_UP,SHIFT_KEY_DOWN);
	public static final InputTrigger	SELECT_DOWN				= new InputTrigger(VK_DOWN,SHIFT_KEY_DOWN);
	public static final InputTrigger	SELECT_LEFT				= new InputTrigger(VK_LEFT,SHIFT_KEY_DOWN);
	public static final InputTrigger	SELECT_RIGHT			= new InputTrigger(VK_RIGHT,SHIFT_KEY_DOWN);
	public static final InputTrigger	LEFT_WORD				= new InputTrigger(VK_LEFT,CTRL_KEY_DOWN);
	public static final InputTrigger	RIGHT_WORD				= new InputTrigger(VK_RIGHT,CTRL_KEY_DOWN);
	public static final InputTrigger	SELECT_LEFT_WORD		= new InputTrigger(VK_LEFT,CTRL_KEY_DOWN|SHIFT_KEY_DOWN);
	public static final InputTrigger	SELECT_RIGHT_WORD		= new InputTrigger(VK_RIGHT,CTRL_KEY_DOWN|SHIFT_KEY_DOWN);
	public static final InputTrigger	TAB						= new InputTrigger(VK_TAB);
	public static final InputTrigger	BACK_TAB				= new InputTrigger(VK_TAB,SHIFT_KEY_DOWN);
	public static final InputTrigger	INDENT					= new InputTrigger(VK_TAB);
	public static final InputTrigger	UNINDENT				= new InputTrigger(VK_TAB,SHIFT_KEY_DOWN);
	public static final InputTrigger	END						= new InputTrigger(VK_END);
	public static final InputTrigger	HOME					= new InputTrigger(VK_HOME);
	public static final InputTrigger	SELECT_END				= new InputTrigger(VK_END,SHIFT_KEY_DOWN);
	public static final InputTrigger	SELECT_HOME				= new InputTrigger(VK_HOME,SHIFT_KEY_DOWN);
	public static final InputTrigger	NEW_LINE				= new InputTrigger(VK_ENTER);
	public static final InputTrigger	DELETE_BACKWARD			= new InputTrigger(VK_BACK_SPACE);
	public static final InputTrigger	DELETE_FORWARD			= new InputTrigger(VK_DELETE);
	public static final InputTrigger	DELETE_WORD_BACKWARD	= new InputTrigger(VK_BACK_SPACE,CTRL_KEY_DOWN);
	public static final InputTrigger	DELETE_WORD_FORWARD		= new InputTrigger(VK_DELETE,CTRL_KEY_DOWN);
	public static final InputTrigger	TOGGLE_LINE_COMMENT		= new InputTrigger(VK_SEMICOLON,CTRL_KEY_DOWN);
	public static final InputTrigger	DUPLICATE				= new InputTrigger(VK_D,CTRL_KEY_DOWN);
	public static final InputTrigger	REMOVE					= new InputTrigger(VK_R,CTRL_KEY_DOWN);
	public static final InputTrigger	SHIFT_UP				= new InputTrigger(VK_UP,CTRL_KEY_DOWN|SHIFT_KEY_DOWN);
	public static final InputTrigger	SHIFT_DOWN				= new InputTrigger(VK_DOWN,CTRL_KEY_DOWN|SHIFT_KEY_DOWN);
	public static final InputTrigger	SELECT_ALL				= new InputTrigger(VK_A,CTRL_KEY_DOWN);
	public static final InputTrigger	SELECT_WORD				= new InputTrigger(DOUBLE_LEFT_CLICK);
	public static final InputTrigger	COPY					= new InputTrigger(VK_C,CTRL_KEY_DOWN);
	public static final InputTrigger	CUT						= new InputTrigger(VK_X,CTRL_KEY_DOWN);
	public static final InputTrigger	PASTE					= new InputTrigger(VK_V,CTRL_KEY_DOWN);
	public static final InputTrigger	UNDO					= new InputTrigger(VK_Z,CTRL_KEY_DOWN);
	public static final InputTrigger	REDO					= new InputTrigger(VK_Y,CTRL_KEY_DOWN);
	public static final InputTrigger	SAVE_ALL				= new InputTrigger(VK_S,CTRL_KEY_DOWN);
	public static final InputTrigger	GO_TO_DEFINITION		= new InputTrigger(new int[]{LEFT_BUTTON,MIDDLE_CLICK,VK_B},new int[]{CTRL_KEY_DOWN|KEY_RELEASE,0,CTRL_KEY_DOWN});
	public static final InputTrigger	AUTOCOMPLETE			= new InputTrigger(VK_SPACE,CTRL_KEY_DOWN);

	public static final InputTrigger	VIEW_DOCUMENTATION		= new InputTrigger(VK_Q,CTRL_KEY_DOWN);
	public static final InputTrigger	JUMP_FORWARD			= new InputTrigger(VK_RIGHT,CTRL_KEY_DOWN|ALT_KEY_DOWN);
	public static final InputTrigger	JUMP_BACKWARD			= new InputTrigger(VK_LEFT,CTRL_KEY_DOWN|ALT_KEY_DOWN);
	public static final InputTrigger	FIX_ERROR				= new InputTrigger(VK_ENTER,ALT_KEY_DOWN);
	public static final InputTrigger	FIND					= new InputTrigger(VK_F,CTRL_KEY_DOWN);
	public static final InputTrigger	GO_TO_HEADER			= new InputTrigger(VK_H,CTRL_KEY_DOWN|SHIFT_KEY_DOWN);
	public static final InputTrigger	MAKE_NEW				= new InputTrigger(VK_INSERT,ALT_KEY_DOWN);
	public static final InputTrigger	RENAME					= new InputTrigger(VK_F6,SHIFT_KEY_DOWN);
	public static final InputTrigger	MOVE					= new InputTrigger(VK_F6);


	public static final ObservedColour	SECTION_NAME_COLOUR		= new ObservedColour(0xFF386090);
	public static final ObservedColour	NAME_COLOUR				= new ObservedColour(0xFF5080C0);
	public static final ObservedColour	TEXT_COLOUR				= new ObservedColour(0xFF000000);
	public static final ObservedColour	EDGE_COLOUR				= new ObservedColour(0xFF000000);
	public static final ObservedColour	INNER_EDGE_COLOUR		= new ObservedColour(0xFFC0C0C0);
	public static final ObservedColour	BG_COLOUR				= new ObservedColour(0xFFFFFFFF);
	public static final ObservedColour	MESSAGE_COLOUR			= new ObservedColour(0xFF808080);
}
